package io.gitee.xyuesheng.day07;

import org.junit.Test;

import java.io.File;
import java.nio.file.*;

public class TestPathMatcher {
    @Test
    public void test() {
//        PathMatcher matcher =new PathMatcher() {
//            @Override
//            public boolean matches(Path path) {
//                return false;
//            }
//        };

        //glob
        //匹配器，匹配所有文件
        PathMatcher matcher = FileSystems.getDefault().getPathMatcher("glod.txt");

        System.out.println(matcher.matches(Paths.get("ab.txt")));
        System.out.println(matcher.matches(Paths.get("abc.txt")));
        System.out.println(matcher.matches(Paths.get("abcd.txt")));


    }


}
